<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

    <body>

        <ui:composition template="../templates/default3.xhtml">         
            <ui:define name="content">
                <h:form id="searchSalesContacts" binding="#{salesInquiryManagerBean.loadSearchSalesContacts}">
                    <p:panel header="Select sales contact" id="selectSalesContact">

                        <p:dataTable id="salesContacts" var="salesContact" value="#{salesInquiryManagerBean.salesContacts}" 
                                     selectionMode="single" selection="#{salesInquiryManagerBean.selectedSalesContact}" update="updateSalesContact"  paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15" rowSelectListener="#{salesInquiryManagerBean.onRowSelect}">
                            <p:column filterBy="#{salesContact.emailAddress}" headerText="Email" filterMatchMode="contains">  
                                <h:outputText value="#{salesContact.emailAddress}" />  
                            </p:column> 
                            <p:column filterBy="#{salesContact.name}" headerText="Name" filterMatchMode="contains">  
                                <h:outputText value="#{salesContact.name}" />  
                            </p:column>
                        </p:dataTable>
                        
                    </p:panel>
                </h:form>
            </ui:define>        
        </ui:composition>
    </body>
</html>
